<template>
	<view class="common">
		<uni-nav-bar color="#fff" background-color="rgba(255,255,255,0)" :border="false" left-icon="left" status-bar
			title="扫码核销" @clickLeft="back" />
		<view class="main">
			<view class="container">
				<view class="box"> <view class="inner" @click="scan">
					<view class="top">
						<image src="@/packageRepair/static/scan.png" mode=""></image>
					</view>
					<view class="end">
						<image src="@/packageRepair/static/code.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shop:null
			}
		},
		onLoad() {
			this.shop=getApp().globalData.shop;
			console.log("接收到shop",this.shop)
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			concel() {
				uni.showToast({
					title: `取消成功`
				});
			},
			scan() {
				uni.showToast({
					title: `开始扫描`
				});

				uni.navigateTo({
					url: "/packageRepair/pages/ORVerification/ORVerification"

				})

				// 调起条码扫描
				uni.scanCode({
					scanType: ['barCode'],
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			}


		}
	};
</script>

<style scoped>
	.container {
		height: 100vh;
	}

	/* #ifdef MP */
	.container {
		background-color: #fff;
		border-radius: 20rpx;
	}

	/* #endif */

	.top>image {
		width: 200rpx;
		height: 200rpx;
	}

	.end {
		padding: 20rpx;
	}

	.end>image {
		width: 160rpx;
		height: 160rpx;

	}

	.box {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 40vh;
	}

	.inner {
		position: relative;
		width: 200rpx;
		height: 200rpx;

	}

	.inner>.top,
	.inner>.end {
		position: absolute;
	}
</style>